trace Verified current stable Not installed? Observability

Trace / Trace Multiple Classes Or Methods Invoke Chain

Trace Multiple Classes Or Methods Invoke Chain

Trace command syntax to Trace multiple classes or methods invoke chain. Copyable examples, output expectations, and common mistakes.

$
Terminal
trace -E <class-pattern1>|<class-patter2> <method-pattern1>|<method-pattern2>|<method-pattern3>

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
Tracing methods and classes:

Class/Method        | Location               | Invocation Count
--------------------|-----------------------|------------------
com.example.ClassA  | ClassA.java:22        | 5
com.example.ClassB  | ClassB.java:47        | 8
com.example.ClassC  | ClassC.java:31        | 3

Finished tracing!

Command Breakdown

What each part is doing

trace
Base Command
The executable that performs this operation. Here it runs Trace before the shell applies any redirect operators.
<class-pattern1>
class pattern1
The value supplied for class pattern1.
<class-patter2>
class patter2
The value supplied for class patter2.
<method-pattern1>
method pattern1
The value supplied for method pattern1.
<method-pattern2>
method pattern2
The value supplied for method pattern2.
<method-pattern3>
method pattern3
The value supplied for method pattern3.
-E
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command: `trace -E com.example.ClassA|com.example.ClassB methodName1|methodName2|methodName3`

  2. Step 2

    Verify the output to check the invocation counts and locations of classes/methods.

Alternative Approaches

Comparable commands in other tools

Alternative observability tools for the same job.